const Mock = require('mockjs')   //随机获取数据
let id = Mock.mock('@id()')
let obj = Mock.mock({
    id:'@id()'
})
let data = Mock.mock({
    id:'@id()',
    username: "@cname()",
    date: "@date()",
    avatar:"@image('200x200','red','#fff','avatar')",
    description: "@paragraph()",
    ip:"@ip()",
    email:"@email()"
})
Mock.mock('/api/users','post', (req, res) =>{
    console.log(req)
    return {
        id:id,
        name:"test",
        role:"test"
    }
 })